package cn.zwx.order.query.svc.domain.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;

/**
 * @author zhangwenxue
 */
@Data
@Document(indexName ="t_order_info")
public class OrderEntity {

    @Id
    @Field(type = FieldType.Text)
    private String docId;

    @Field(type = FieldType.Text)
    private String orderId;

    @Field(type = FieldType.Double,index = false)
    private BigDecimal orderAmount;

    @Field(type = FieldType.Integer)
    private Integer orderStatus;

    @Field(type = FieldType.Text, analyzer = "my_analyzer")
    private String orderDescription;

}
